The accuracy of Inverse Distance Weighting (IDW) will be affected by the selection of reference points and parameters. Aiming at the problem of ignoring local characteristics in multi-Parameter co-optimization Inverse Distance Weighting algorithm (PIDW), an improved algorithm based on particle swarm local optimized IDW was proposed, namely Particle swarm Local optimization Inverse Distance Weight (PLIDW). Firstly, the parameters of each sample point in the study area were optimized respectively, and the cross-validation method was used for evaluation, and the optimal set of parameters for each sample point was recorded. At the same time, in order to improve the query efficiency, a K-Dimensional Tree (KD-Tree) was used to save the spatial positions and optimal parameters. Finally, according to the spatial proximity, the nearest set of parameters was selected from KD-Tree to optimize IDW. Experimental results based on simulated data and real temperature dataset show that compared with PIDW, PLIDW has the accuracy on the real dataset improved by more than 4.18%. This shows that the low accuracy in some scenarios caused by ignoring local features in PIDW is improved by the proposed algorithm, and the adaptability is increased at the same time.